home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / mac / Ad / Mod04 / Puzzles / crypto.Dir / 00031.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  887 b   |  42 lines

  1. on startMovie
  2.   global selectedLetter
  3.   repeat with i = 1 to 17
  4.     put char i of "Pldkmqhrv,ezthia." into field i
  5.   end repeat
  6.   set HC to the number of cast "handCursor"
  7.   cursor([HC, HC + 1])
  8.   set selectedLetter to "a"
  9. end
  10.  
  11. on wait ticks
  12.   set temp to the timer
  13.   repeat while (the timer - temp) < ticks
  14.   end repeat
  15. end
  16.  
  17. on switchLetters
  18.   global selectedLetter
  19.   if the castNum of sprite the clickOn = 1 then
  20.     put numToChar(charToNum(selectedLetter) - 32) into field 1
  21.   else
  22.     put selectedLetter into field the castNum of sprite the clickOn
  23.   end if
  24.   puppetSound("nice pling.s")
  25.   updateStage()
  26.   checkSentence()
  27. end
  28.  
  29. on checkSentence
  30.   set allGood to 1
  31.   repeat with i = 1 to 17
  32.     if field i <> char i of "youarecls,pnthid." then
  33.       set allGood to 0
  34.     end if
  35.   end repeat
  36.   if allGood then
  37.     puppetSound("Something.S")
  38.     updateStage()
  39.     play done
  40.   end if
  41. end
  42.